package org.emergency.framework.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.emergency.framework.constant.ModelConstant;

/**
 * TbUserRoleEntity entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_USER_ROLE_ENTITY", catalog = ModelConstant.DB_CATALOG)
public class TbUserRoleEntity implements java.io.Serializable {
	private static final long serialVersionUID = 7200675601926928730L;

	@Id
	@Column(name = "TB_USER_ROLE_ENTITY_ID", unique = true, nullable = false, length = ModelConstant.STRING_LENGHT_id)
	private String TbUserRoleEntityId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TB__TB_ROLE_ID")
	private TbRole tbRole;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TB__TB_ENTITY_ID")
	private TbEntity tbEntity;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TB__TB_USER_ID")
	private TbUser tbUser;

	// Constructors

	/** default constructor */
	public TbUserRoleEntity() {
	}

	/** minimal constructor */
	public TbUserRoleEntity(String TbUserRoleEntityId) {
		this.TbUserRoleEntityId = TbUserRoleEntityId;
	}

	/** full constructor */
	public TbUserRoleEntity(String TbUserRoleEntityId, TbRole tbRole,
			TbEntity tbEntity, TbUser tbUser) {
		this.TbUserRoleEntityId = TbUserRoleEntityId;
		this.tbRole = tbRole;
		this.tbEntity = tbEntity;
		this.tbUser = tbUser;
	}

	public String getTbUserRoleEntityId() {
		return TbUserRoleEntityId;
	}

	public void setTbUserRoleEntityId(String tbUserRoleEntityId) {
		TbUserRoleEntityId = tbUserRoleEntityId;
	}

	public TbRole getTbRole() {
		return this.tbRole;
	}

	public void setTbRole(TbRole tbRole) {
		this.tbRole = tbRole;
	}

	public TbEntity getTbEntity() {
		return this.tbEntity;
	}

	public void setTbEntity(TbEntity tbEntity) {
		this.tbEntity = tbEntity;
	}

	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

}